
using System;

namespace cachier
{


	public class CommandFactory
	{

		public static Command ParseCommand (String line)
		{
			string[] args = line.Split (' ');
			
			switch (args[0]) {
			case "+":
				return new AddCommand (args);
			case "-":
				return new GetCommand (args);
			case "?":
				return new PrintCommand ();
			case "exit":
				return new ExitCommand ();
			default:
				
				return null;
			}
		}
	}
}